package com.ctshk.rpc.user.req;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.experimental.Accessors;

import javax.validation.constraints.*;
import java.io.Serializable;
import java.time.LocalDate;
import java.util.Date;

/**
 * <p>
 *  常用旅客证件req
 * </p>
 *
 * @author 李新科
 * @date 2021/5/17 11:35
 */
@Data
@ApiModel
@Accessors(chain = true)
public class PassengerCertificatesReq implements Serializable {

    @ApiModelProperty(name = "id", value = "id,修改时需要传")
    private Long id;

    @ApiModelProperty(value="证件类型",required = true)
    @NotNull(message = "证件类型不能为空")
    private Long certificatesTypeId;

    @ApiModelProperty(value="证件类型名称",required = true)
    @NotBlank(message = "证件类型名称不能为空")
    private String certificatesTypeName;

    @ApiModelProperty(value="有效时间")
    private LocalDate effectiveTime;

    @ApiModelProperty(value="签发地区id")
    private Long areaId;

    @ApiModelProperty(value="签发地区名称")
    @Size(max = 20,message = "签发地区名称最大为20个字符")
    private String areaName;

    @ApiModelProperty(value="证件号码",required = true)
    @NotBlank(message = "证件号码不能为空")
    @Pattern(regexp = "[A-Za-z0-9]+",message = "不合法的证件格式")
    @Size(max = 20,message = "证件号码最大为20个字符")
    private String certificatesNumber;
}
